load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

rust_library(
    name = "cup_utils",
    srcs = glob(["src/**/*.rs"]),
    crate_name = "ic_consensus_cup_utils",
    version = "0.9.0",
    deps = [
        "//rs/consensus/dkg",
        "//rs/consensus/idkg",
        "//rs/interfaces/registry",
        "//rs/monitoring/logger",
        "//rs/phantom_newtype",
        "//rs/protobuf",
        "//rs/registry/helpers",
        "//rs/types/types",
        "@crate_index//:slog",
    ],
)

rust_test(
    name = "cup_utils_test",
    crate = ":cup_utils",
    deps = [
        "//rs/crypto/test_utils/ni-dkg",
        "//rs/types/types_test_utils",
        "@crate_index//:prost",
    ],
)
